<template>
	<view class="page" :style="{minHeight:$height()}">
		
		<view class="footer">
			
			<view class="footerItem" v-for="(item,index) in list" :key="index">
				<view class="footerItemLeft">
					<view class="li">
						{{item.companyName}}
					</view>
					<view class="li date">
						居间费：{{item.betweenPrice}}
					</view>
					<view class="li date">
						结算电量：{{item.electricity}}
					</view>
					<view class="li date">
						结算价格：{{item.formulaPrice}}
					</view>
					<view class="li date">
						加项：{{item.additionsPrice}}
					</view>
					<view class="li date">
						减项：{{item.deductionPrice}}
					</view>
				</view>
				<view class="footerItemRight">
					<view class="tiXianChengGong">
						代理费：{{item.price}}
					</view>
				</view>
			</view>
			
			<view class="footerItem" v-for="(item,index) in takesList" :key="index">
				<view class="footerItemLeft" style="width:65%;">
					<view class="li">
						{{item.remark}}
					</view>
				</view>
				<view class="footerItemRight">
					<view class="tiXianChengGong">
						提成：{{item.income}}
					</view>
				</view>
			</view>

		</view>
		
		<image v-if="list.length == 0 && takesList.length == 0" src="@/static/image/empty.png" mode="widthFix" class="is-empty"></image>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
				list: [],
				takesList:[],
				importId:0
			}

		},
		onLoad(options) {
			this.importId = options.importId
			this.getMyCommissionDetailRes()
			this.getTakesRecordsRes()
		},
		
		methods: {
			getMyCommissionDetailRes() {
				this.$axios.request(this.$api.getCompanyElecList, "GET", {
					importId:this.importId
				}).then((val) => {

					this.list = val.data
					
				})
			},
			getTakesRecordsRes()
			{
				this.$axios.request(this.$api.getTakesRecordsRes,"GET",{
					importId:this.importId
				}).then((val) => {
					this.takesList = val.data
				})
			}
		}
	}
</script>

<style>
	.page {
		width: 100%;
		background-color: #F3F4F8;
		overflow-y: hidden;
	}

	.header {
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		width: 750rpx;
		height: 388rpx;
		background-color: #3975EA;
	}

	.headerTitle {
		font-size: 20rpx;
		
		font-weight: 300;
		color: #FFFFFF;
	}

	.eDu {

		margin: 12rpx 0 18rpx;
	}

	.leiBox {
		display: flex;
		justify-content: center;
		font-size: 20rpx;
		
		font-weight: 300;
		color: #FFFFFF;
	}

	.leiBoxItem {
		margin: 0 10rpx;
	}

	.submit {
		padding: 4rpx 30rpx;
		border: 1rpx solid #3975EA;
		border-radius: 4rpx;
		font-size: 28rpx;
		
		font-weight: 400;
		line-height: 64rpx;
		text-align: center;
		color: #3975EA;
		background-color: #fff;
		margin: 20rpx 0 20rpx;
	}

	.submit1 {
		border-radius: 4rpx;
		font-size: 28rpx;
		
		font-weight: 400;
		line-height: 64rpx;
		text-align: center;
		color: #3975EA;
		background-color: #fff;
		margin: 20rpx 0 20rpx;
	}

	.embodyManagement {
		font-size: 28rpx;
		
		font-weight: 400;
		color: #FFFFFF
	}

	.eDuNum {
		font-size: 36rpx;
		
		font-weight: 600;
		color: #FFFFFF;
	}

	.eDuIocn {
		font-size: 13px !important;
		margin-right: 10rpx;
		
		font-weight: 600;
		color: #FFFFFF;
	}

	.footer {
		width: 100%;
		/* height: 836rpx; */
		background-color: #fff;
		margin-top: 12rpx;
		/* background-color: #3975EA; */
	}

	.footerHeader {
		display: flex;
		justify-content: space-between;
		align-items: center;
		width: 702rpx;
		padding: 0 8rpx;
		margin: 0 auto 0;
		height: 96rpx;
		border-bottom: 1rpx solid #F1F1F1;
	}

	.footerHeaderLift {
		font-size: 28rpx;
		font-family: 'PingFang SC';
		font-weight: 600;
		color: #333333;
	}

	.footerTxt {
		font-size: 24rpx;
		font-family: 'PingFang SC';
		font-weight: 600;
		color: #3975EA;
		margin-right: 12rpx;
	}

	.footerItem {
		display: flex;
		padding:20rpx;
		justify-content: space-between;
		align-items: center;
		width: 702rpx;
		border-bottom: 1rpx solid #F1F1F1;
		border-radius: 4rpx;
		margin: 0 auto 0;
	}

	.footerItemLeft,
	.footerItemRight {
		display: flex;
		justify-content: center;
		align-items: flex-start;
		flex-direction: column;
		height: 100%;
	}

	.footerItemRight {
		align-items: center;
	}

	.li {
		font-size: 24rpx;
		font-family: 'PingFang SC';
		font-weight: 300;
		color: #333333;
		margin: 3rpx;
	}

	.date {
		font-size: 20rpx;
		font-family: .PingFang SC;
		font-weight: 500;
		color: #999999;
		margin-top: 16rpx;
	}

	.genjin {
		font-size: 24rpx;
		
		font-weight: 400;
		color: #FFA12A;
	}

	.tiXianChengGong {
		font-size: 24Rpx;
		
		font-weight: 400;
		/* line-height: 46px; */
		color: #3975EA;
	}

	.tiXianShiBai {
		font-size: 24rpx;
		
		font-weight: 400;
		color: #FF2D55;

	}

	.lookYuanYin {
		font-size: 20rpx;
		
		font-weight: 300;
		color: #666666;
		margin-top: 8rpx;
	}

	.daoZhang {
		font-size: 24rpx;
		font-family: 'PingFang SC';
		font-weight: 400;
		color: #6FC954;
	}
</style>
